package cn.stylefeng.guns.modular.business.neo4j.entity;

import cn.stylefeng.guns.modular.business.neo4j.relationship.ReEvent;
import cn.stylefeng.guns.modular.business.neo4j.relationship.ReNodeEvent;
import cn.stylefeng.guns.modular.business.neo4j.relationship.ReRiverway;
import cn.stylefeng.guns.modular.business.neo4j.relationship.ReTown;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import org.springframework.data.neo4j.core.schema.GeneratedValue;
import org.springframework.data.neo4j.core.schema.Id;
import org.springframework.data.neo4j.core.schema.Node;
import org.springframework.data.neo4j.core.schema.Relationship;

import java.util.ArrayList;
import java.util.List;

@Node
public class Event {
    @Id
    @GeneratedValue
    private Long id;
//    @ApiModelProperty("名称ID")
    private String indexId;
//    @ApiModelProperty("名称")
    private String title;

    @Relationship(type = "INCIDENT_IN", direction = Relationship.Direction.INCOMING)
    private List<ReEvent> reEventList = new ArrayList<>();

    @Relationship(type = "RIVER_IN", direction = Relationship.Direction.OUTGOING)
    private List<ReRiverway> reRiverwayList = new ArrayList<>();

    @Relationship(type = "TOWN_IN", direction = Relationship.Direction.OUTGOING)
    private List<ReTown> reTownList = new ArrayList<>();

    @Relationship(type = "NODE_EVENT", direction = Relationship.Direction.INCOMING)
    private List<ReNodeEvent> reNodeEventList = new ArrayList<>();
    public Event() {
    }

    public Event(String indexId, String title) {
        this.indexId = indexId;
        this.title = title;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getIndexId() {
        return indexId;
    }

    public void setIndexId(String indexId) {
        this.indexId = indexId;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public List<ReEvent> getReEventList() {
        return reEventList;
    }

    public void setReEventList(List<ReEvent> reEventList) {
        this.reEventList = reEventList;
    }

    public List<ReRiverway> getReRiverwayList() {
        return reRiverwayList;
    }

    public void setReRiverwayList(List<ReRiverway> reRiverwayList) {
        this.reRiverwayList = reRiverwayList;
    }

    public List<ReTown> getReTownList() {
        return reTownList;
    }

    public void setReTownList(List<ReTown> reTownList) {
        this.reTownList = reTownList;
    }

    public List<ReNodeEvent> getReNodeEventList() {
        return reNodeEventList;
    }

    public void setReNodeEventList(List<ReNodeEvent> reNodeEventList) {
        this.reNodeEventList = reNodeEventList;
    }
}
